package router

import (
	"football/src/services"

	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()

	r.GET("/fixtures", services.GetFixtures)
	r.GET("/strategy_onway", services.GetOnlineStrategy)
	r.GET("/strategy_monitor", services.GetStrategyMonitor)
	r.GET("/leagues", services.GetLeagueList)

	//上传文件模块
	r.POST("/files/upload", services.Uploadfile)

	//用户模块
	r.POST("/user/register", services.RegisterUser)
	r.POST("/user/login", services.LoginUser)
	r.GET("/user/logout", services.LogoutUser)
	r.POST("/user/update", services.UpdateUser)
	r.GET("/user/userinfo", services.GetUserInfo)

	return r
}
